package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.cn.jx.common.entity.BaseEntity;
import com.jx.enumType.YesNoEnum;

/**
 * <p>FileSystem 文件系统POJO类 对应数据库表名 SYS_FILE
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseEntity <tt>BaseEntity</tt>}
 *  
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_FILE")
public class FileSystem extends BaseEntity {

	private static final long serialVersionUID = 7314712442358584824L;
	
	/** <p>文件名 <p>设置为{@link String String}类型*/
	@Column(name="name",length=32)
	private String name;
	
	/** <p>文件夹 <p>设置为{@link String String}类型*/
	@Column(name="folder",length=32)
	private String folder;
	
	/** <p>文件夹访问地址 <p>设置为{@link String String}类型*/
	@Column(name="url",length=64)
	private String url;
	
	/** <p>文件大小 <p>设置为{@link Integer Integer}类型*/
	@Column(name="size")
	private Integer size;
	
	/** <p>文件后缀 <p>设置为{@link Integer Integer}类型*/
	@Column(name="suffix",length=10)
	private String suffix;
	
	/** <p>文件范围，private 私有 ,public 共有 <p>设置为{@link Integer Integer}类型*/
	@Column(name="file_scope",length=10)
	private String scope;
	
	/** <p>所属应用<p>设置为{@link String String}类型*/
	@Column(name="r_apply",length=10)
	private String apply;
	
	/** <p>正在使用 1表示是 ，0表示没有任何地方用 <p>设置为{@link String String}类型*/
	@Column(name="r_useing")
	private Integer useing;
	
	/** <p>文件使用类型 用途 ，头像 其他图片，文件， <p>设置为{@link Integer Integer}类型*/
	@Column(name="use_type",length=10)
	private String useType;
	
	/**
	 * 初始化创建类
	 * @return
	 */
	public static FileSystem getInstance(String operUser){
		Date day=new Date();
		FileSystem m=new FileSystem();
		m.setId(getRandomId());
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setValidFlg(YesNoEnum.YES.getCode());
		m.setCreateTime(day);
		m.setOperatTime(day);
		m.setOperatUser(operUser);
		m.setCreateUser(operUser);
		return m;
	}
	
	/** <p>{@link String String}<p>getUrl()*/
	public String getUrl() {
		return url;
	}
	/** <p>{@link String String}<p>getName()*/
	public String getName() {
		return name;
	}
	/** <p>{@link String String}<p>getSuffix()*/
	public String getSuffix() {
		return suffix;
	}
	/** <p>{@link String String}<p>getFolder()*/
	public String getFolder() {
		return folder;
	}
	/** <p>{@link Integer Integer}<p>getSize()*/
	public Integer getSize() {
		return size;
	}
	/** <p>{@link String String}<p>getScope()*/
	public String getScope() {
		return scope;
	}
	/** <p>{@link String String}<p>getApply()*/
	public String getApply() {
		return apply;
	}
	/** <p>{@link String String}<p>getUseing()*/
	public Integer getUseing() {
		return useing;
	}
	/** <p>{@link String String}<p>getUseType()*/
	public String getUseType() {
		return useType;
	}
	
	/** <p>setUrl({@link String url})*/
	public void setUrl(String url) {
		this.url = url;
	}
	/** <p>setName({@link String name})*/
	public void setName(String name) {
		this.name = name;
	}
	/** <p>setSuffix({@link String suffix})*/
	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}
	/** <p>setFolder({@link String folder})*/
	public void setFolder(String folder) {
		this.folder = folder;
	}
	/** <p>setSize({@link Integer  size})*/
	public void setSize(Integer size) {
		this.size = size;
	}
	/** <p>setScope({@link String  scope})*/
	public void setScope(String scope) {
		this.scope = scope;
	}
	/** <p>setApply({@link String  apply})*/
	public void setApply(String apply) {
		this.apply = apply;
	}
	/** <p>setUseing({@link String  useing})*/
	public void setUseing(Integer useing) {
		this.useing = useing;
	}
	/** <p>setUseType({@link String  useType})*/
	public void setUseType(String useType) {
		this.useType = useType;
	}
}
